﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Content.master" AutoEventWireup="true" CodeFile="ColumnMaintain.aspx.cs" Inherits="Admin_ColumnMaintain" Title="Untitled Page" Theme = "Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	<asp:MultiView runat = "server" ID = "MultiViewViews" ActiveViewIndex = "0">
		<asp:View runat = "server" ID = "Show">
			<%--栏目名称--%>
			<div class = "ColumnTitleDiv">
				<asp:LinkButton runat = "server" ID = "BtnToAdd" Text = "添加" CssClass = "Add" OnClick = "BtnToAdd_OnClick"></asp:LinkButton>
			</div>
			
			<%--查询模块--%>
			<div class = "QueryDiv">
				<asp:LinkButton runat = "server" Text = "查询全部" ID = "BtnQueryAll" CssClass = "QueryAll" OnClick = "BtnQueryAll_OnClick"></asp:LinkButton>
				<asp:DropDownList runat = "server" ID = "DdlFatherColumnQuery"></asp:DropDownList>
				<asp:LinkButton runat = "server" ID = "BtnQuery" Text = "查询" OnClick = "BtnQuery_OnClick"></asp:LinkButton>
			</div>
			
			<asp:GridView runat = "server" ID = "GrvColumn" CssClass = "GridView"
				 OnSelectedIndexChanging = "GrvColumn_OnSelectedIndexChanging"
				 OnRowDeleting = "GrvColumn_OnRowDeleting"
				 OnDataBound = "GrvColumn_OnDataBound">
				<Columns>
					<asp:TemplateField HeaderText = "选择" ItemStyle-Width = "30px">
						<ItemTemplate>
							<asp:CheckBox runat = "server" ID = "CheckBoxMultiSelect" />
						</ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="序号" ItemStyle-Width="30px">
						<ItemTemplate>
							<%# GrvColumn.PageIndex * GrvColumn.PageSize + GrvColumn.Rows.Count + 1%>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField HeaderText = "名称" DataField = "Name" />
					<asp:BoundField HeaderText = "上级栏目" DataField = "FatherName" />
					<asp:BoundField HeaderText = "地址" DataField = "Link" />
					<asp:BoundField HeaderText = "顺序" DataField = "Order" />
					<asp:BoundField HeaderText = "类别" DataField = "TypeName" />
					<asp:TemplateField HeaderText = "操作" ItemStyle-Width = "80px">
						<ItemTemplate>
							<asp:LinkButton runat = "server" Text = "修改" CommandName = "Select"></asp:LinkButton>
							<asp:LinkButton ID="BtnDelete" runat = "server" Text = "删除" CommandName = "Delete" OnClientClick = "javascript:return confirm('确认要删除吗？')"></asp:LinkButton>
						</ItemTemplate>
					</asp:TemplateField>
				</Columns>
			</asp:GridView>
			<div class = "TableDelimiter"></div>
			<div class = "ResultEnd">
				<div></div>
				<asp:LinkButton runat = "server" ID = "BtnMultiDelete" Text = "删除所选" OnClick = "BtnMultiDelete_OnClick" OnClientClick = "javascript:return confirm('确认要删除吗？')"></asp:LinkButton>
				<span class = "PageNav">
					<asp:LinkButton ID="BtnFirst" runat="server" Text="第一页" OnClick="BtnFirst_OnClick"></asp:LinkButton>
					<asp:LinkButton ID="BtnPrev" runat="server" Text="前一页" OnClick="BtnPrev_OnClick"></asp:LinkButton>
					<asp:LinkButton ID="BtnNext" runat="server" Text="后一页" OnClick="BtnNext_OnClick"></asp:LinkButton>
					<asp:LinkButton ID="BtnLast" runat="server" Text="最后一页" OnClick="BtnLast_OnClick"></asp:LinkButton>
					第<asp:Label runat="server" ID="LabNowPage"></asp:Label>页/共<asp:Label runat="server" ID="LabTotalPage"></asp:Label>页
				</span>
			</div>
		</asp:View>
		<asp:View runat = "server" ID = "ShowAdd">
			<div class = "ColumnTitleDiv">
				<span class = "ColumnName">添加栏目</span>
			</div>
			<table class = "TableForAdd">
				<tbody>
					<tr>
						<td class = "FirstCol">
							名称：
						</td>
						<td>
							<asp:TextBox runat = "server" ID = "TxtAddName" CssClass = "Text"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							上级栏目：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlAddFatherUserGroup" CssClass = "Select"></asp:DropDownList>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							地址：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlAddFile" CssClass = "Select"></asp:DropDownList>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							类别：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlTypeAdd" CssClass = "Select"></asp:DropDownList>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							顺序：
						</td>
						<td>
							<asp:TextBox runat = "server" ID = "TxtAddOrder" Text = "0" CssClass = "Text"></asp:TextBox>
						</td>
					</tr>
				</tbody>
			</table>
			<div class = "ResultEnd">
				<asp:LinkButton runat = "server" ID = "BtnAdd" Text = "添加" CssClass = "Operation" OnClick = "BtnAdd_OnClick"></asp:LinkButton>
			</div>
		</asp:View>
		<asp:View runat = "server" ID = "ShowModify">
			<div class = "ColumnTitleDiv">
				<span class = "ColumnName">修改栏目</span>
			</div>
			<table class = "TableForAdd">
				<tbody>
					<tr>
						<td class = "FirstCol">
							名称：
						</td>
						<td>
							<asp:TextBox runat = "server" ID = "TxtModifyName" CssClass = "Text"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							上级栏目：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlModifyFather" CssClass = "Select"></asp:DropDownList>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							地址：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlModifyLink" CssClass = "Select"></asp:DropDownList>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							类别：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlTypeModify" CssClass = "Select"></asp:DropDownList>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							顺序：
						</td>
						<td>
							<asp:TextBox runat = "server" ID = "TxtModifyOrder" Text = "0" CssClass = "Text"></asp:TextBox>
						</td>
					</tr>
				</tbody>
			</table>
			<div class = "ResultEnd">
				<asp:LinkButton runat = "server" ID = "BtnModify" Text = "修改" CssClass = "Operation" OnClick = "BtnModify_OnClick"></asp:LinkButton>
			</div>
		</asp:View>
	</asp:MultiView>
</asp:Content>

